
package nccloud.bs.arap.txdj.maintain.rule.unsave;

import nc.vo.arap.amortization.AggAmortizationVO;
import nc.vo.arap.amortization.AmortizationVO;
import nccloud.arap.util.tool.AllotBillStatus;
import nc.impl.pubapp.pattern.rule.IRule;
import nc.impl.pubapp.pattern.data.vo.VOUpdate;

public class SetFreeStateRule implements IRule<AggAmortizationVO> {
        
        public void process(AggAmortizationVO[] vos) {
                int len = vos.length;
        nc.vo.arap.amortization.AmortizationVO[] headers = new nc.vo.arap.amortization.AmortizationVO[len];

                for (int i = 0; i < len; ++i) {
                        headers[i] = vos[i].getParentVO();
                        headers[i].setApprovestatus((Integer) AllotBillStatus.FREE.value());
                }

                String[] names = new String[]{"approvestatus"};
                VOUpdate<nc.vo.arap.amortization.AmortizationVO> bo = new VOUpdate();
                bo.update(headers, names);
        }

}
